# -*- coding: utf-8 -*-
'''
@time: 2019/1/30 11:22
@author: hyq
@software: PyCharm
@file: Test_classify.py
'''
import unittest
from appium import webdriver
from PO.IndexPage import IndexPage
from PO.ClassifyPage import ClassifyPage


class TestClassify(unittest.TestCase):
    """测试分类入口"""

    def setUp(self):
        capabilities = {
            'platformName': 'Android',
            'platformVersion': '4.4.2',
            'deviceName': '127.0.0.1:62001',
            'appPackage': 'com.guokr.mentor',
            'appActivity': '.ui.activity.MainActivity',
            'unicodeKeyboard': True,
            'resetKeyboard': True,
            'noReset': True
        }
        self.driver = webdriver.Remote("http://localhost:4723/wd/hub", capabilities)
        self.myindex = IndexPage(self.driver)
        self.myclass = ClassifyPage(self.driver)

    def tearDown(self):
        self.driver.quit()

    def test06(self):
        """测试职场发展"""
        self.myindex.workplace()
        self.assertEqual(self.myclass.title(), '职场发展')
